<?php
/**
 * Created by PhpStorm.
 * User: 25791
 * Date: 2020/10/27
 * Time: 10:00
 * Note: master.php
 */

namespace cli\crond\queue;


use app\lib\base;

class master extends base
{
    /**
     * 启动队列
     */
    public function go()
    {
        $this->lib_queue->setUnitHandler(__CLASS__, 'queue_unit')->start();
    }

    /**
     * @param string $type
     * @param string $name
     *
     * @deprecated
     */
    public function queue_unit(string $type = 'realtime', string $name = 'main:')
    {
        $this->lib_queue->unitHandler($type, $name);
    }
}